package com.yuefresh.dish;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.yuefresh.core.Model;
import com.yuefresh.sys.Status;


@Entity
@Table(name = "ds_order")
public class Order  extends Model {
	private static final long serialVersionUID = 1534214124234L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	private Long id;
	@Column(name = "CODE")
	private String code;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STATUS_FK")
	private Status status;
	@Column(name = "ORDER_DATE")
	private Date orderDate;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEAL_FK")
	private Meal meal;
	@Column(name = "AMOUNT")
	private String amount;
	@Column(name = "MEMO")
	private String memo;
	
	public Order() {}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}

	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}

	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}

	public Meal getMeal() {
		return meal;
	}
	public void setMeal(Meal meal) {
		this.meal = meal;
	}

	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
}
